<div local-class='operations-peek-item'>
  {{#if @shouldShowStats}}
    <ul local-class='statsList'>
      {{#each @revisionOperation.stats as |stat|}}
        <li local-class='stat'>
          <span local-class='stat-count'>
            {{stat.count}}
          </span>

          <span local-class='stat-action'>
            {{stat.action}}
          </span>
        </li>
      {{else}}
        <li local-class='noChanges'>
          {{t 'components.operations_peek.item.empty_changes'}}
        </li>
      {{/each}}
    </ul>
  {{/if}}

  {{#if @shouldShowOperations}}
    <ul local-class='operationsList'>
      <input local-class='input' type='text' placeholder={{t 'components.conflicts_filters.input_placeholder_text'}} {{on 'keyup' this.filterOperations}} />

      {{#each this.operations as |operation|}}
        <li local-class='operation'>
          <div local-class='operation-header'>
            <span local-class='operation-key'>
              {{operation.key}}
            </span>
            <strong local-class='operation-action'>
              {{operation.action}}
            </strong>
          </div>

          <div local-class='operation-content'>
            {{#if operation.previousText}}
              {{#if operation.text}}
                <div>
                  <span local-class='operation-textLabel'>
                    {{t 'components.operations_peek.item.previous_label'}}
                  </span>

                  <div local-class='operation-text'>{{operation.previousText}}</div>
                </div>

                <div>
                  <span local-class='operation-textLabel'>
                    {{t 'components.operations_peek.item.text_label'}}
                  </span>

                  <div local-class='operation-text'>{{operation.text}}</div>
                </div>
              {{else}}
                <div local-class='operation-text'>{{operation.previousText}}</div>
              {{/if}}
            {{else}}
              <div local-class='operation-text'>{{operation.text}}</div>
            {{/if}}
          </div>
        </li>
      {{else}}
        {{#if this.searchQuery}}
          <li local-class='noChanges'>
            {{t 'components.operations_peek.item.empty_results'}}
          </li>
        {{else}}
          <li local-class='noChanges'>
            {{t 'components.operations_peek.item.empty_changes'}}
          </li>
        {{/if}}
      {{/each}}
    </ul>
  {{/if}}
</div>